#ifndef PGRESULT_H
#define PGRESULT_H

//something like smart-pointer for PostgreSQL query result: PGresult

#include <libpq-fe.h>

namespace Porridge
{

class PGResult
{
    PGresult * res;
public:
    PGResult(PGresult * res_);
    ~PGResult();
    PGResult& operator=(const PGResult &other);
    PGResult& operator=(PGresult * res_);
    operator PGresult*();
    void clear();
};

} //namespace Porridge

#endif // PGRESULT_H
